package com.anjbo.common;

import com.anjbo.common.Enums.AssessStatusEnum;

public enum MortgageStateEnums {
	msg("msg","提示信息"),
	appNo("appNo","申请编号"),
	houseUse("houseUse","房屋用途"),
	assessResultTime("assessResultTime","评估时间"),
	reason("reason","失败原因"),
	totalAmount("totalAmount","总值"),
	netAllTax("netAllTax","净值（扣全税）"),
	netDeedTax("netDeedTax","净值（扣契税）"),
	loanLimit("loanLimit","贷款期限(月)"),
	lendingDate("lendingDate","放款日"),
	rate("rate","利率(%)"),
	lendingAccount("lendingAccount","放款账号"),
	repaymentWay("repaymentWay","还款方式"),
	lendingAmount("lendingAmount","放款金额(万元)"),
	maturityDate("maturityDate","到期日"),
	loanAccount("loanAccount","贷款账号");
	
	private String code;
	private String name;
	
	MortgageStateEnums(String code, String name){
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static String getNameByCode(String code) {
		String name = "";
		for (MortgageStateEnums roleEnum : MortgageStateEnums.values()) {
			if (roleEnum.getCode().equals(code)) {
				name = roleEnum.getName();
				break;
			}
		}
		return name;
	}
}
